import * as category from './category'
import * as bangdanList from './bangdanList'
import * as apply from './apply'
import * as brand from './brand'
import * as code from './code'
import * as gusetBook from './guestBook'
import * as image from './image'
import * as oauthLogin from './oauthLogin'
import * as wx from './wx'
import * as common from './common'
import * as homePage from './homePage'
import * as other from './other'

const apiObj = {
  ...category,
  ...bangdanList,
  ...apply,
  ...brand,
  ...code,
  ...gusetBook,
  ...image,
  ...oauthLogin,
  ...wx,
  ...common,
  ...homePage,
  ...other
}

const install = function(Vue) {
  if (install.installed) return
  Object.defineProperties(Vue.prototype, {
    $api: {
      get() {
        return apiObj
      }
    }
  })
}
export default {
  install
}
